package com.foodchain.repository;

import com.foodchain.entity.ActivityUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface ActivityUserRepository extends JpaRepository<ActivityUser,String>, JpaSpecificationExecutor<ActivityUser> {
    @Query(value = "from ActivityUser where userPhone=?1 and activityId=?2")
    ActivityUser findByUserIdAndActivityId(String userPhone, String activityId);
}
